libxl: suspend: Async xenstore pvcontrol wait
authorIan Jackson <ian.jackson@eu.citrix.com>
Thu, 5 Dec 2013 18:50:55 +0000 (18:50 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 17 Mar 2014 15:54:00 +0000 (15:54 +0000)
commitd12e4ad65c2bf5c9a8ca2c40295e72f1279036c4
tree49f5d8b71b55ddaa281089d2b6e5b6af7943001a
parent62657e313189f9fe86ccd33414a5122de25595a3
libxl: suspend: Async xenstore pvcontrol wait

When negotiating guest suspend via the xenstore pvcontrol protocol
(ie when the guest does NOT support the evtchn fast suspend protocol):

Replace the use of loops and usleep with a call to libxl__xswait.

Also, replace the xenstore transaction loop with one using
libxl__xs_transaction_start et al.

There is not intended to be any semantic change, other than to make
the algorithm properly asynchronous.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v3: Add a comment to clarify last minute ack.
v3X: Do NOT rename "pvcontrol" xswait state struct to "guest_wait"
     (because we're NOT going to use it for the event channel based wait
     too).
tools/libxl/libxl_dom.c
tools/libxl/libxl_internal.h